1. Field of the Invention
The present invention relates to a method of encryption for shared libraries in an open operating system. More particularly, the present invention relates to a method for encrypting a partial portion of an executable and linkable format file in an open operating system so as to ensure protection of the shared libraries.
2. Description of Related Art
FIG. 1 refers to a flowchart illustrating that an open operating system loads and executes shared libraries in the prior art. In the area of computing, a library, especially a shared library, provides an effective way to conserve disk and memory space required for running an application program. A shared library is, in general, a library file which includes a lot of application programming interfaces (API) that can be invoked by external programs and be linked during program execution.
Before a program is executed, the operating system first determines whether the program to be executed is dependent on other shared libraries. As indicated in step 11, if the operating system determines that the program is not dependent on any other shared libraries, the program is executed directly without linking to or loading the shared libraries.
On the other hand, if the operating system determines that the program to be executed is dependent on other shared libraries, the program is first linked with the shared libraries. The operating system then passes the control to the loader by which the shared libraries that the program is dependent on are loaded into the memory, as indicated in step 13. After the dependent libraries are loaded into the memory, the operating system then executes the shared libraries, as indicated in step 15, to complete the process of library loading.
While in practice, it is common that the shared libraries in an open operating system are written by a third party, and users may have to pay to get access to the shared libraries. However, the shared libraries may be subject to stealing by adversaries who may use the libraries without paying, causing some loss to the library payers and providers.